package com.bdqn.mapper;

import com.bdqn.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {


    /**
     * 根据ID删除用户
     *
     * @param userId
     * @return
     */
    int del(Long userId);
    /**
     * 根据ID查询用户
     *
     * @param userId
     * @return
     */
    SysUser getById(Long userId);
    int getAccountC(@Param("account") String account);
    int savePassword(@Param("account")String account,@Param("pwd")String pwd);
    int getPwd(@Param("oldPassword")String oldPassword,@Param("account")String account);
    int  add(SysUser sysUser);
    Long count(@Param("realName") String  realName,@Param("roleId")Long roleId);
    List<SysUser> page(@Param("realName") String realName,@Param("roleId")Long roleId,@Param("pageIndex")Long pageIndex,@Param("pageSize")Long pageSize);
    SysUser getByAccountAndPassword(@Param("account") String account, @Param("password")String password);

    int exist(String account);
}
